Optimal. Leaf size=32 \[ -\frac{(a+b) \csc ^2(e+f x)}{2 f}-\frac{a \log (\sin (e+f x))}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0505279, antiderivative size = 32, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {4138, 444, 43} \[ -\frac{(a+b) \csc ^2(e+f x)}{2 f}-\frac{a \log (\sin (e+f x))}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4138
Rule 444
Rule 43
Rubi steps
\begin{align*} \int \cot ^3(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{x \left (b+a x^2\right )}{\left (1-x^2\right )^2} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{\operatorname{Subst}\left (\int \frac{b+a x}{(1-x)^2} \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=-\frac{\operatorname{Subst}\left (\int \left (\frac{a+b}{(-1+x)^2}+\frac{a}{-1+x}\right ) \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=-\frac{(a+b) \csc ^2(e+f x)}{2 f}-\frac{a \log (\sin (e+f x))}{f}\\ \end{align*}
Mathematica [A] time = 0.164611, size = 52, normalized size = 1.62 \[ -\frac{a \left (\cot ^2(e+f x)+2 \log (\tan (e+f x))+2 \log (\cos (e+f x))\right )}{2 f}-\frac{b \csc ^2(e+f x)}{2 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.054, size = 43, normalized size = 1.3 \begin{align*} -{\frac{ \left ( \cot \left ( fx+e \right ) \right ) ^{2}a}{2\,f}}-{\frac{a\ln \left ( \sin \left ( fx+e \right ) \right ) }{f}}-{\frac{b}{2\,f \left ( \sin \left ( fx+e \right ) \right ) ^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.991948, size = 39, normalized size = 1.22 \begin{align*} -\frac{a \log \left (\sin \left (f x + e\right )^{2}\right ) + \frac{a + b}{\sin \left (f x + e\right )^{2}}}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.528583, size = 116, normalized size = 3.62 \begin{align*} -\frac{2 \,{\left (a \cos \left (f x + e\right )^{2} - a\right )} \log \left (\frac{1}{2} \, \sin \left (f x + e\right )\right ) - a - b}{2 \,{\left (f \cos \left (f x + e\right )^{2} - f\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sec ^{2}{\left (e + f x \right )}\right ) \cot ^{3}{\left (e + f x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.41751, size = 204, normalized size = 6.38 \begin{align*} \frac{8 \, a \log \left (-\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1\right ) - 4 \, a \log \left (-\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right ) + \frac{{\left (a + b + \frac{4 \, a{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1}\right )}{\left (\cos \left (f x + e\right ) + 1\right )}}{\cos \left (f x + e\right ) - 1} + \frac{a{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac{b{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1}}{8 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]